<template>
  <div>
    <template v-if="code.value">
      <SvgIcon class="mr-[2px] text-[14px] text-[var(--main-color)] inline" icon-class="state_enable"/>
      <span>{{code.label}}</span>
    </template>
    <template v-else>
      <SvgIcon class="mr-[2px] text-[14px] text-[var(--info-color)] inline" icon-class="state_disabled"/>
      <span>{{code.label}}</span>
    </template>
  </div>
</template>
<script setup>
import SvgIcon from '@/components/SvgIcon/index.vue';
const props = defineProps({
  code: null,
});
const { code } = toRefs(props);
</script>

<style lang="scss" scoped></style>
